<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('待认证列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
		<div class="row">
	        <div class="col-sm-12 select-table table-striped">
	            <table id="bootstrap-table" data-mobile-responsive="true"></table>
	        </div>
	    </div>
	</div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/user";

        $(function() {
            var options = {
                url: prefix + "/rzList",
                modalName: "参数",
                columns: [
               {
		            field: 'userId',
		            title: '用户ID'
		        },
		        {
		            field: 'loginName',
		            title: '登录名称'
		        },
		        {
		            field: 'userName',
		            title: '用户名称'
		        },
		        {
		            field: 'email',
		            title: '邮箱',
		            visible: false
		        },
		        {
		            field: 'phonenumber',
		            title: '手机'
		        },
		        {
                    field: 'idcardno',
                    title: '身份证'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-primary btn-xs " href="javascript:void(0)" onclick="updateRz(\'' + row.userId + '\',1)">通过</a> ');
	                    actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="updateRz(\'' + row.userId + '\',2)">不通过</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
        
        function updateRz(userId,rz){
			$.operate.submit(prefix+"/updateRz", "post", "json", {"userId":userId,"rz": rz});
		}
    </script>
</body>
</html>